/**
 * @file   1104.cpp
 * @author Shuang Hu <hsmath@ubuntu>
 * @date   Sun May  9 17:19:50 2021
 * 
 * @brief  PAT advanced 1104
 * 
 * 
 */
#include<iostream>
#include<cmath>
#include<vector>
#include<iomanip>
using namespace std;
int main(){
    int N;
    cin>>N;
    vector<double> seq;
    for(int i=0;i<N;i++){
	double d;
	cin>>d;
	seq.push_back(d);
    }
    double sum=0;
    for(int i=0;i<N;i++){
	sum=sum+seq[i]*(i+1)*(N-i);
    }
    cout<<fixed<<setprecision(2)<<sum<<endl;
}
